﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    public class Student
    {
        string studentid;
        string name;
        string sex;
        DateTime birthday;
        string grade;
        int departmentid;
        int professionid;

        public string Studentid
        {
            get
            {
                return studentid;
            }

            set
            {
                studentid = value;
            }
        }

        public string Name
        {
            get
            {
                return name;
            }

            set
            {
                name = value;
            }
        }

        public string Sex
        {
            get
            {
                return sex;
            }

            set
            {
                sex = value;
            }
        }

        public DateTime Birthday
        {
            get
            {
                return birthday;
            }

            set
            {
                birthday = value;
            }
        }

        public string Grade
        {
            get
            {
                return grade;
            }

            set
            {
                grade = value;
            }
        }

        public int Departmentid
        {
            get
            {
                return departmentid;
            }

            set
            {
                departmentid = value;
            }
        }

        public int Professionid
        {
            get
            {
                return professionid;
            }

            set
            {
                professionid = value;
            }
        }
        public  void ShowInfo() {
            Console.WriteLine("学号：" + this.Studentid);
            Console.WriteLine("姓名：" + this.Name);
            Console.WriteLine("性别：" + this.Sex);
            Console.WriteLine("出生日期：" + this.Birthday.ToShortDateString());
            Console.WriteLine("年级：" + this.Grade);
            Console.WriteLine("系部代码：" + this.Departmentid);
            Console.WriteLine("专业代码：" + this.Professionid);
        }
        //public virtual void ShowInfo()
        //{
        //    Console.WriteLine("学号：" + this.Studentid);
        //    Console.WriteLine("姓名：" + this.Name);
        //    Console.WriteLine("性别：" + this.Sex);
        //    Console.WriteLine("出生日期：" + this.Birthday.ToShortDateString());
        //    Console.WriteLine("年级：" + this.Grade);
        //    Console.WriteLine("系部代码：" + this.Departmentid);
        //    Console.WriteLine("专业代码：" + this.Professionid);
        //}虚类
        public Student(){}
        public Student(string sid,string name,string sex,DateTime nirthday,string grade,int deptid,int professionid) {
            this.Studentid=sid;
            this.Name = name;
            this.Sex = sex;
            this.Birthday = birthday;
            this.Grade = grade;
            this.Departmentid = deptid;
            this.Professionid = professionid;
        }
    }
}
